﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm2-9.aspx.cs" Inherits="Example.WebForm2_9" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <title></title>
</head>
<body>
  <form id="form1" runat="server">
    特定值比较验证示例<hr />
    <div>
      到达日期：<asp:TextBox ID="txtArrivalDate" runat="server"></asp:TextBox>
      <asp:CompareValidator ID="CompareValidator1" runat="server" Display="Dynamic"
        ErrorMessage="请输入正确的日期格式，如：2010/02/01" Font-Size="Small"
        Operator="DataTypeCheck" ControlToValidate="txtArrivalDate"
        Type="Date" /><br />
      离开日期：<asp:TextBox ID="txtDepartureDate" runat="server"></asp:TextBox>
      <asp:CompareValidator ID="CompareValidator2" runat="server" Display="Dynamic"
        ErrorMessage="离开日期不能早于到达日期！" Font-Size="Small"
        Operator="GreaterThanEqual" ControlToValidate="txtDepartureDate"
        Type="Date" ControlToCompare="txtArrivalDate" /><br />
      <asp:Button ID="Button1" runat="server" Text="确定" />

    </div>
  </form>
</body>
</html>
